<#--POJO-EX-->
<#-- 传入参数 Func func, DataTable table --> 
package ${func.javaPkg}.pojo;

import java.util.Map;
import javax.persistence.Column;
import com.vecspace.data.model.RowMapper;

/** ${table.tableCaption!}
 * @template dayu-code-builder
 * @author ${author}
 * @reviewer 
 * @createTime ${nowTime}
 */
public class ${table.className}Ex extends ${table.className} implements java.io.Serializable {
  private static final long serialVersionUID = 200${table.id?c}L;

    public ${table.className}Ex(){
    }

    public ${table.className}Ex(${table.className} ${table.beanName}){
        set${table.className}(${table.beanName});
    }
<#-- 关联表的名称字段 -->
<#list columns as column>
<#if column.isRefColumn>
    private String ${column.refNameColumnVarName};
    @Column(name="${column.refNameColumnName}", table="${column.refTableName}")
    public String get${column.refNameColumnPropName}(){
        return ${column.refNameColumnVarName};
    }

    public void set${column.refNameColumnPropName}(String value){
        this.${column.refNameColumnVarName} = value;
    }
</#if>
</#list>
    /**拷贝${table.beanName}对象的属性值赋值到本对象的属性值*/
    public void set${table.className}(${table.className} obj){
    <#list columns as column>
        this.set${column.propName}(obj.get${column.propName}());
    </#list>
    }
    
    @Override
    public void parseFrom(Map<String, Object> row){
        super.parseFrom(row);
        RowMapper rowMapper = new RowMapper(row);
<#-- 关联表的名称字段 -->
<#list columns as column>
<#if column.isRefColumn>
        this.${column.refNameColumnVarName} = rowMapper.getString("${column.refNameColumnName?upper_case}");
</#if>
</#list>
    }
}
